package com.iris.clone;

/**
 * @author : Iris.Xiao
 * @date : 2017/12/08 10:19
 * @description :
 */
public class CloneMain {
    public static void main(String[] args) {
        CloneTest ct = new CloneTest();
        CloneBean bean = new CloneBean();
        bean.setBeanStr("bean=====str");
        ct.setBean(bean);
        ct.setParentStr("parent====");
        ct.setI(9);
        ct.setStr("00000");
        CloneTest ct2 = ct.clone();
        System.out.println(ct2.getStr());
        System.out.println(ct.getStr());
        System.out.println(ct2.getParentStr());
        System.out.println(ct2.getBean().getBeanStr());
        ct.getBean().setBeanStr("bean===str===update");
        System.out.println(ct2.getBean().getBeanStr());
        System.out.println(ct==ct2);
    }
}
